<template>
  <article>
    <SubjectItemList></SubjectItemList>  
  </article>
</template>

<script>
import { Loading } from 'element-ui'
import Sticky from '@/components/Sticky'
import SubjectItemList from '../components/SubjectItemList'

export default {
  name: 'info',
  data () {
    return {
      loadingInstance: null, // loading对象
      currentPage: 1,
      pageSize: 10,
      total: 0, // 总数量
    }
  },
  computed: {
  },
  components: {
    // 注册组件
    Sticky,
    SubjectItemList
  },
  watch: {
    $route (to, from) {
      location.reload()
    }
  },
  mounted () {
    var that = this
    setTimeout(() => {
      that.loadingInstance.close()
    }, 200)

    // 屏幕自适应
    window.onresize = () => {
      return (() => {
        // 屏幕大于950px的时候，显示侧边栏
        that.showSidebar = document.body.clientWidth > 950
      })()
    }
  },
  created () {
    this.loadingInstance = Loading.service({
      fullscreen: true,
      text: '正在努力加载中~'
    })
  },
  methods: {
  }
}
</script>

<style>
  
</style>
